$OpenBSD: patch-sysdeps_openbsd_procmap_c,v 1.20 2014/11/18 18:35:47 jasper Exp $

From 057dcf77d63700b97f5c146cb35b1026f516eaec Mon Sep 17 00:00:00 2001
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
Date: Tue, 18 Nov 2014 19:33:38 +0100
Subject: Sync with OpenBSD's uvm_extern.h changes

From 9a887feed2147f32ac360be92405e41ad324ff95 Mon Sep 17 00:00:00 2001
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
Date: Thu, 10 Jul 2014 13:15:50 +0200
Subject: Unbreak build on OpenBSD after recent header changes.

--- sysdeps/openbsd/procmap.c.orig	Mon Apr 28 15:09:24 2014
+++ sysdeps/openbsd/procmap.c	Tue Nov 18 08:39:53 2014
@@ -41,6 +41,10 @@
 #include <sys/ucred.h>
 #include <sys/sysctl.h>
 
+/* XXX until uvm gets cleaned up */
+#include <sys/mutex.h>
+typedef int boolean_t;
+
 #undef _KERNEL
 #define _UVM_UVM_AMAP_I_H_ 1
 #define _UVM_UVM_MAP_I_H_ 1
@@ -276,11 +280,11 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_
 
 		mentry->perm   = (guint64) 0;
 
-		if (entry->protection & VM_PROT_READ)
+		if (entry->protection & PROT_READ)
 			mentry->perm |= GLIBTOP_MAP_PERM_READ;
-		if (entry->protection & VM_PROT_WRITE)
+		if (entry->protection & PROT_WRITE)
 			mentry->perm |= GLIBTOP_MAP_PERM_WRITE;
-		if (entry->protection & VM_PROT_EXECUTE)
+		if (entry->protection & PROT_EXEC)
 			mentry->perm |= GLIBTOP_MAP_PERM_EXECUTE;
 	}
 
